const router = require("koa-router")();
const main = require("../models");
const {ObjectId} = require("mongodb");
router.get("/doDelete",async ctx=>{
    console.log(ctx.query);
    var {_id} = ctx.query;
    var table = await main("member");
    var res = await table.deleteOne({_id:ObjectId(_id)})
    console.log(res);
    await ctx.redirect("/home")
})

module.exports = router;